<?php if (!defined('THINK_PATH')) exit();?><!DOCTYPE html>
<html>
<head>
	<meta content="text/html; charset=utf-8">
	<title>Basic Form - jQuery EasyUI Demo</title>
	<link rel="stylesheet" type="text/css" href="/Public/themes/default/easyui.css">
	<link rel="stylesheet" type="text/css" href="/Public/themes/icon.css">
	<link rel="stylesheet" type="text/css" href="/Public/Css/demo.css">
	<script type="text/javascript" src="/Public/js/jquery.min.js"></script>
	<script type="text/javascript" src="/Public/js/jquery.easyui.min.js"></script>
        <script>
            window.onload=function (){
              var t= $("#txt").val();
              $("#txt").val(window.unescape(t));
            }
        </script>
</head>
<body>
	<div class="easyui-panel" title="设置欢迎语" style="width:800px">
		<div style="padding:10px 0 10px 60px">
	    <form id="ff" method="post" >
	    	<table>
	    		<tr>
	    			<td>欢迎语:</td>
                                <td><input name="ID" type="hidden" value="<?php echo ($vo["ID"]); ?>" /></td>
	    			<td><textarea name="message" style="height:60px; width:600px" id="txt"><?php echo ($vo["Content"]); ?></textarea></td>
	    		</tr>
	    	
	    	</table>
	    </form>
	    </div>
	    <div style="text-align:center;padding:5px">
                
                <a href="javascript:void(0)" class="easyui-linkbutton" onclick="submitForm()">保存</a>
	    	<a href="javascript:void(0)" class="easyui-linkbutton" onclick="clearForm()">清空</a>
	    </div>
	</div>
	<script>
		function submitForm(){
                    var formData=$('#ff').serialize();
                    $.post("<?php echo U('Welcome/Handle');?>",formData,function(data){
                        if(data=="y")
                        {
                            alert("保存成功！");
                        }
                        else
                        {
                            alert("保存失败！");
                        }
                        
                    });
		}
		function clearForm(){
			$('#ff').form('clear');
		}
	</script>
</body>
</html>